<?php
error_reporting(E_ERROR | E_WARNING | E_PARSE);

define('ACCESS_TOKEN_TIMEOUT', 3600);   //通信凭证的有效时长
define('RERESH_TOKEN_TIMEOUT', 3600);   //刷新通信凭证的有效时长，access_token的失效时间延长的时长

return [
    // 应用调试模式
    'app_debug'              => true,
    // 应用Trace
    'app_trace'              => true,
    // 是否支持多模块
    'app_multi_module'       => false,
    // 是否开启路由
    'url_route_on'           => false,
    // 是否自动转换URL中的控制器和操作名
    'url_convert'            => false,
    
    //加密前缀
    'ENCRYPT_PREFIX' => [
        'user_passwd'           => '3cad532aa3ba8106',
        'user_dynamic_passwd'   => '09ad2465f2208371',
    ],
    
    //Api客户端程序通信帐号信息
    'AuthClient'  => [
        87206833    => [
            'client_id'         => 87206833,
            'client_secret'     => '0e5fd9cf8676b91d040a874b2f2515fb',
            'crypt_level_floor' => 0,
            'private_key'       => '-----BEGIN RSA PRIVATE KEY-----
MIICXQIBAAKBgQC3//sR2tXw0wrC2DySx8vNGlqt3Y7ldU9+LBLI6e1KS5lfc5jl
TGF7KBTSkCHBM3ouEHWqp1ZJ85iJe59aF5gIB2klBd6h4wrbbHA2XE1sq21ykja/
Gqx7/IRia3zQfxGv/qEkyGOx+XALVoOlZqDwh76o2n1vP1D+tD3amHsK7QIDAQAB
AoGBAKH14bMitESqD4PYwODWmy7rrrvyFPEnJJTECLjvKB7IkrVxVDkp1XiJnGKH
2h5syHQ5qslPSGYJ1M/XkDnGINwaLVHVD3BoKKgKg1bZn7ao5pXT+herqxaVwWs6
ga63yVSIC8jcODxiuvxJnUMQRLaqoF6aUb/2VWc2T5MDmxLhAkEA3pwGpvXgLiWL
3h7QLYZLrLrbFRuRN4CYl4UYaAKokkAvZly04Glle8ycgOc2DzL4eiL4l/+x/gaq
deJU/cHLRQJBANOZY0mEoVkwhU4bScSdnfM6usQowYBEwHYYh/OTv1a3SqcCE1f+
qbAclCqeNiHajCcDmgYJ53LfIgyv0wCS54kCQAXaPkaHclRkQlAdqUV5IWYyJ25f
oiq+Y8SgCCs73qixrU1YpJy9yKA/meG9smsl4Oh9IOIGI+zUygh9YdSmEq0CQQC2
4G3IP2G3lNDRdZIm5NZ7PfnmyRabxk/UgVUWdk47IwTZHFkdhxKfC8QepUhBsAHL
QjifGXY4eJKUBm3FpDGJAkAFwUxYssiJjvrHwnHFbg0rFkvvY63OSmnRxiL4X6EY
yI9lblCsyfpl25l7l5zmJrAHn45zAiOoBrWqpM5edu7c
-----END RSA PRIVATE KEY-----',
            'public_key'        => '-----BEGIN PUBLIC KEY-----
MIGfMA0GCSqGSIb3DQEBAQUAA4GNADCBiQKBgQC3//sR2tXw0wrC2DySx8vNGlqt
3Y7ldU9+LBLI6e1KS5lfc5jlTGF7KBTSkCHBM3ouEHWqp1ZJ85iJe59aF5gIB2kl
Bd6h4wrbbHA2XE1sq21ykja/Gqx7/IRia3zQfxGv/qEkyGOx+XALVoOlZqDwh76o
2n1vP1D+tD3amHsK7QIDAQAB
-----END PUBLIC KEY-----',
        ],
    ],
    
    
    'STATUS_CODE'   => [
        'ok'                        => [0, ''],
        'error_status_code'         => [0, '错误的状态码'],
        
        'no_access_request'         => [0, '禁止请求'],
        'request_timeout'           => [0, '请求超时: %s'],
        'empty_id_client'           => [0, '缺少id_client'],
        'empty_sign'                => [0, '缺少sign'],
        'error_sign'                => [0, '错误的sign: %s'],
        'error_crypt_level'         => [0, '加密通信等级错误'],
        'api_no_access'             => [0, '接口无权访问'],
        
        'error_access_token'        => [0, '无效或失效的通信凭证'],
        'no_access'                 => [0, '无权访问'],
        'no_access_user'            => [0, '用户无权访问'],
        'exe_fail'                  => [0, '执行失败'],
        'exe_frequently'            => [0, '操作过于频繁'],
        'empty_update'              => [0, '要保存的数据不存在'],
        
        'user_disabled'             => [0, '用户已被禁用'],
        'login_error'               => [0, '登录失败，帐号或密码错误'],
        'empty_refresh_token'       => [0, '刷新凭证不能为空'],
        'error_refresh_token'       => [0, '错误的刷新凭证'],
        'refresh_token_timeout'     => [0, '更新凭证已过期失效'],
        'null_user'                 => [0, '用户不存在'],
        'error_refresh_access_token'=> [0, '更新用户凭证失败'],
    ],
];
